<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>3dchess: S:/dev/3dchess/src/logic/ChessBoard.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">3dchess
   </div>
   <div id="projectbrief">Basic chess application with OpenGL graphics and AI</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_3d2e4578fe4cc3b7fa6177047437af5b.html">logic</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">ChessBoard.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">    Copyright (c) 2013-2014, Max Stark &lt;max.stark88@googlemail.com&gt;</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"></span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">    All rights reserved.</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"></span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">    Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">    modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"></span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">    1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">    this list of conditions and the following disclaimer.</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"></span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">    2. Redistributions in binary form must reproduce the above copyright</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">    notice, this list of conditions and the following disclaimer in the</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">    documentation and/or other materials provided with the distribution.</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"></span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">    3. Neither the name of the copyright holder nor the names of its</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">    contributors may be used to endorse or promote products derived from</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">    this software without specific prior written permission.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"></span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment">    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment">    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment">    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment">    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment">    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment">    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment">    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="comment">    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="comment">    POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment">*/</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#ifndef CHESSBOARD_H</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CHESSBOARD_H</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#include &lt;stdarg.h&gt;</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#include &lt;array&gt;</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &lt;cmath&gt;</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#include &quot;Turn.h&quot;</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">#include &quot;IncrementalMaterialAndPSTEvaluator.h&quot;</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">#include &quot;IncrementalZobristHasher.h&quot;</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">#ifdef _MSC_VER</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#include &lt;intrin.h&gt;</span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="preprocessor">#ifdef _WIN64</span></div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#pragma intrinsic(_BitScanReverse64)</span></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="preprocessor"></span><span class="keyword">inline</span> Field getFirstOccupiedField(BitBoard bb) {</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    assert(bb != 0);</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    assert(<span class="keyword">sizeof</span>(Field) == <span class="keyword">sizeof</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>));</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> result;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    _BitScanReverse64(&amp;result, bb);</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span>Field<span class="keyword">&gt;</span>(result);</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;}</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="preprocessor">#else //_WIN32</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#pragma intrinsic(_BitScanReverse)</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="preprocessor"></span><span class="keyword">inline</span> Field getFirstOccupiedField(BitBoard bb) {</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    assert(bb != 0);</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    assert(<span class="keyword">sizeof</span>(Field) == <span class="keyword">sizeof</span>(<span class="keywordtype">long</span>));</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> result;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <span class="keywordflow">if</span> (_BitScanReverse(&amp;result, bb &gt;&gt; 32) == 0) {</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        _BitScanReverse(&amp;result, bb &amp; 0xFFFFFFFF);</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span>Field<span class="keyword">&gt;</span>(result);</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    }</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span>Field<span class="keyword">&gt;</span>(result + 32);</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;}</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="preprocessor">#endif //_WIN64</span></div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#elif defined(__GNUC__) || defined(__clang__)</span></div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="preprocessor"></span><span class="keyword">inline</span> Field getFirstOccupiedField(BitBoard bb) {</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    assert(bb != 0);</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    assert(<span class="keyword">sizeof</span>(Field) == <span class="keyword">sizeof</span>(<span class="keywordtype">int</span>));</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span>Field<span class="keyword">&gt;</span>(63 - __builtin_clzll(bb));</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;}</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="preprocessor"></span><span class="comment">// This shouldn&#39;t be used really. Too slow.</span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="keyword">inline</span> Field getFirstOccupiedField(BitBoard bb) {</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span>Field<span class="keyword">&gt;</span>(<span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>(std::log2((<span class="keywordtype">double</span>)bb)));</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;}</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="comment">/* Some helpful macros for bit pushing */</span></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="preprocessor">#define BB_SCAN(   bb)         getFirstOccupiedField(bb) </span><span class="comment">/* returns the field of MS1B */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define BIT_SET(   bb, field) (bb |=   (BitBoard)1 &lt;&lt; (field))</span></div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define BIT_CLEAR( bb, field) (bb &amp;= ~((BitBoard)1 &lt;&lt; (field)))</span></div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define BIT_TOGGLE(bb, field) (bb ^=   (BitBoard)1 &lt;&lt; (field))</span></div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define BIT_ISSET( bb, field) (bb &amp; (  (BitBoard)1 &lt;&lt; (field)))</span></div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div>
<div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="class_chess_board.html">   97</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_chess_board.html">ChessBoard</a> {</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_turn_generator.html">TurnGenerator</a>;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_incremental_zobrist_hasher.html">IncrementalZobristHasher</a>;</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <a class="code" href="class_chess_board.html">ChessBoard</a>();</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <a class="code" href="class_chess_board.html">ChessBoard</a>(std::array&lt;Piece, 64&gt; board,</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;               PlayerColor nextPlayer,</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;               std::array&lt;bool, NUM_PLAYERS&gt; shortCastleRight,</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;               std::array&lt;bool, NUM_PLAYERS&gt; longCastleRight,</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;               Field enPassantSquare,</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;               <span class="keywordtype">int</span> halfMoveClock,</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;               <span class="keywordtype">int</span> fullMoveClock);</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    </div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_chess_board.html#ab4aa36299b386ba09c0aaf40ef08a0c1">applyTurn</a>(<span class="keyword">const</span> <a class="code" href="class_turn.html">Turn</a>&amp; t);</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    std::array&lt;Piece, 64&gt; <a class="code" href="class_chess_board.html#add1b52e7b8ee41a962d59f82792e0666">getBoard</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_chess_board.html#ab54fd0c9f3287221eb5d088d637fb2f3">hasBlackPieces</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_chess_board.html#aa0e0a4215f74f15349b29ef7a8863845">hasWhitePieces</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    PlayerColor <a class="code" href="class_chess_board.html#a6a8bbf77568617dcc75609861733d114">getNextPlayer</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    Score <a class="code" href="class_chess_board.html#a7d4081d779ec49ac4ea42bc506efe434">getScore</a>(PlayerColor color, <span class="keywordtype">size_t</span> depth = 0) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    Hash <a class="code" href="class_chess_board.html#a1b26faed1336dee886105a1201b619f4">getHash</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="class_chess_board.html#a59082f27d8f96fc37de407cb77fd0ea5">getHalfMoveClock</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="class_chess_board.html#a5cde9075f0b58d6ec2cff5672fea4bc8">getFullMoveClock</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    </div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    <span class="keyword">static</span> <a class="code" href="class_chess_board.html">ChessBoard</a> <a class="code" href="class_chess_board.html#a431307acbaaad8bf0e0f1c0afa35a08d">fromFEN</a>(<span class="keyword">const</span> std::string&amp; fen);</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    </div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    std::string <a class="code" href="class_chess_board.html#a2d372757f127000773d3cb8696f499b7">toFEN</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    Field <a class="code" href="class_chess_board.html#a081989eac9f68b03db955ba68239faaf">getEnPassantSquare</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    std::array&lt;bool, NUM_PLAYERS&gt; <a class="code" href="class_chess_board.html#a3aace2ced12ff4a3eaac1e0e3d5432b2">getShortCastleRights</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    std::array&lt;bool, NUM_PLAYERS&gt; <a class="code" href="class_chess_board.html#a1208d7e82f41b8e272d646bf4169c577">getLongCastleRights</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    std::array&lt;bool, NUM_PLAYERS&gt; <a class="code" href="class_chess_board.html#a567e519cf53ae019112678af8e38b622">getKingInCheck</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_chess_board.html#ac4a6c01a3e1a0109e135848898025be7">isStalemate</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    std::array&lt;bool, NUM_PLAYERS&gt; <a class="code" href="class_chess_board.html#adbad856fde411e1def92582c72f163a1">getCheckmate</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_chess_board.html#a7075b709c7cf0062bcbd3df8fc43f98d">isGameOver</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_chess_board.html#a33bf2bb0050730099562e962d69f2419">isDrawDueTo50MovesRule</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    PlayerColor <a class="code" href="class_chess_board.html#a4e177beabcbcdc6a2f59ec341b8ec4fc">getWinner</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <a class="code" href="struct_piece.html">Piece</a> <a class="code" href="class_chess_board.html#aed18d89038898d1d92f342854c295d57">getLastCapturedPiece</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> <a class="code" href="class_chess_board.html">ChessBoard</a>&amp; other) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;    <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> <a class="code" href="class_chess_board.html">ChessBoard</a>&amp; other) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    std::string toString() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="class_chess_board.html#ab1d92307774eb87b65c0a731dcb191f5">  186</a></span>&#160;    std::array&lt;std::array&lt;BitBoard,NUM_PIECETYPES+1&gt;, NUM_PLAYERS&gt; <a class="code" href="class_chess_board.html#ab1d92307774eb87b65c0a731dcb191f5">m_bb</a>;</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_chess_board.html#ae335d91157ca9f927f171f2e6d6c39c5">updateBitBoards</a>();</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_chess_board.html#ad693b43b092dc20452118a3a7b4d1b5a">setKingInCheck</a>(PlayerColor player, <span class="keywordtype">bool</span> kingInCheck);</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_chess_board.html#a29ae57f7e0c6d57da5d8711262335be6">setStalemate</a>();</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_chess_board.html#a38d61076dd7630693f4284db78d16652">setCheckmate</a>(PlayerColor player);</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_chess_board.html#aa66fd0c22576fb2fd1ba3fe5a0b5793f">initBitBoards</a>(std::array&lt;Piece, 64&gt; board);</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_chess_board.html#a8822d129d96fd857e954ce371e72c6a3">applyMoveTurn</a>(<span class="keyword">const</span> <a class="code" href="class_turn.html">Turn</a>&amp; turn);</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_chess_board.html#ac968c5f1018eb92ca273ef3f2305a1c8">applyCastleTurn</a>(<span class="keyword">const</span> <a class="code" href="class_turn.html">Turn</a>&amp; turn);</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_chess_board.html#af375c6e604cee2fbedb0340f9aacbe4c">applyPromotionTurn</a>(<span class="keyword">const</span> <a class="code" href="class_turn.html">Turn</a>&amp; turn, <span class="keyword">const</span> PieceType pieceType);</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_chess_board.html#a4dc28ca7db68d048818d7b52bcd4e943">capturePiece</a>(<span class="keyword">const</span> <a class="code" href="class_turn.html">Turn</a>&amp; turn);</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_chess_board.html#afa2ca9d62fbf4c196ecce26d95b8b157">addCapturedPiece</a>(<span class="keyword">const</span> <a class="code" href="struct_piece.html">Piece</a> capturedPiece, Field field);</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_chess_board.html#a109aefc39d981c2b17be3fa7e54deba1">updateEnPassantSquare</a>(<span class="keyword">const</span> <a class="code" href="class_turn.html">Turn</a>&amp; turn);</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_chess_board.html#aa371aeae444e129c7baee9653a317fee">updateCastlingRights</a>(<span class="keyword">const</span> <a class="code" href="class_turn.html">Turn</a>&amp; turn);</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;</div>
<div class="line"><a name="l00218"></a><span class="lineno"><a class="line" href="class_chess_board.html#a9b1d8836cd2962cc36a55fc69055bfa4">  218</a></span>&#160;    std::array&lt;bool, NUM_PLAYERS&gt; <a class="code" href="class_chess_board.html#a9b1d8836cd2962cc36a55fc69055bfa4">m_kingInCheck</a>;</div>
<div class="line"><a name="l00220"></a><span class="lineno"><a class="line" href="class_chess_board.html#a3f8a1713916079f98a1a29e3ff2cdcae">  220</a></span>&#160;    std::array&lt;bool, NUM_PLAYERS&gt; <a class="code" href="class_chess_board.html#a3f8a1713916079f98a1a29e3ff2cdcae">m_checkmate</a>;</div>
<div class="line"><a name="l00222"></a><span class="lineno"><a class="line" href="class_chess_board.html#a5bfc458b1a3fcf0b4d5bedae1d53de9a">  222</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_chess_board.html#a5bfc458b1a3fcf0b4d5bedae1d53de9a">m_stalemate</a>;</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;</div>
<div class="line"><a name="l00225"></a><span class="lineno"><a class="line" href="class_chess_board.html#aca220e449835c01b9996c6e10207cfd4">  225</a></span>&#160;    std::array&lt;bool, NUM_PLAYERS&gt; <a class="code" href="class_chess_board.html#aca220e449835c01b9996c6e10207cfd4">m_shortCastleRight</a>;</div>
<div class="line"><a name="l00227"></a><span class="lineno"><a class="line" href="class_chess_board.html#a57cdf18ab640366eccf0c6319e0b6941">  227</a></span>&#160;    std::array&lt;bool, NUM_PLAYERS&gt; <a class="code" href="class_chess_board.html#a57cdf18ab640366eccf0c6319e0b6941">m_longCastleRight</a>;</div>
<div class="line"><a name="l00229"></a><span class="lineno"><a class="line" href="class_chess_board.html#a1dc65ec797d17b1e66f3daa36c22791f">  229</a></span>&#160;    Field <a class="code" href="class_chess_board.html#a1dc65ec797d17b1e66f3daa36c22791f">m_enPassantSquare</a>;</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;</div>
<div class="line"><a name="l00232"></a><span class="lineno"><a class="line" href="class_chess_board.html#a4a45fd266f940e9db704444f20f2e670">  232</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="class_chess_board.html#a4a45fd266f940e9db704444f20f2e670">m_halfMoveClock</a>;</div>
<div class="line"><a name="l00234"></a><span class="lineno"><a class="line" href="class_chess_board.html#abbc0a4a2932ac230a660fbe0b5ddeacc">  234</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="class_chess_board.html#abbc0a4a2932ac230a660fbe0b5ddeacc">m_fullMoveClock</a>;</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;</div>
<div class="line"><a name="l00237"></a><span class="lineno"><a class="line" href="class_chess_board.html#ae6739b17a2c903ce368fda6c4504fb70">  237</a></span>&#160;    PlayerColor <a class="code" href="class_chess_board.html#ae6739b17a2c903ce368fda6c4504fb70">m_nextPlayer</a>;</div>
<div class="line"><a name="l00239"></a><span class="lineno"><a class="line" href="class_chess_board.html#a934f63dd2e2e8ca881cd16e8a8948c70">  239</a></span>&#160;    <a class="code" href="struct_piece.html">Piece</a> <a class="code" href="class_chess_board.html#a934f63dd2e2e8ca881cd16e8a8948c70">m_lastCapturedPiece</a>;</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;    <a class="code" href="class_incremental_material_and_p_s_t_evaluator.html">IncrementalMaterialAndPSTEvaluator</a> m_evaluator;</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;    <a class="code" href="class_incremental_zobrist_hasher.html">IncrementalZobristHasher</a> m_hasher;</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;};</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;<span class="comment">/* for debug purposes only */</span></div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;<span class="preprocessor">#define BB_SET( field) static_cast&lt;BitBoard&gt;(std::pow(2, (int)field)) </span><span class="comment">/* returns the value 2^field */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00248"></a><span class="lineno"><a class="line" href="struct_po_f.html">  248</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_po_f.html">PoF</a> {</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;    <a class="code" href="struct_piece.html">Piece</a> piece;</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;    Field field;</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;    <a class="code" href="struct_po_f.html">PoF</a>(<a class="code" href="struct_piece.html">Piece</a> piece, Field field)</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;        : piece(piece), field(field) {}</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;};</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;<a class="code" href="class_chess_board.html">ChessBoard</a> generateChessBoard(std::vector&lt;PoF&gt; pieces, PlayerColor nextPlayer = White);</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;std::string bitBoardToString(BitBoard b);</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;BitBoard generateBitBoard(Field f1, ...);</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;<span class="preprocessor">#endif // CHESSBOARD_H</span></div>
<div class="ttc" id="class_chess_board_html_af375c6e604cee2fbedb0340f9aacbe4c"><div class="ttname"><a href="class_chess_board.html#af375c6e604cee2fbedb0340f9aacbe4c">ChessBoard::applyPromotionTurn</a></div><div class="ttdeci">void applyPromotionTurn(const Turn &amp;turn, const PieceType pieceType)</div><div class="ttdoc">Promotes a pawn to a given piece type (Queen | Bishop | Rook | Knight). </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:211</div></div>
<div class="ttc" id="class_chess_board_html_ac4a6c01a3e1a0109e135848898025be7"><div class="ttname"><a href="class_chess_board.html#ac4a6c01a3e1a0109e135848898025be7">ChessBoard::isStalemate</a></div><div class="ttdeci">bool isStalemate() const </div><div class="ttdoc">Gameover-Flag for stalemate position (gameover, no winner). </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:537</div></div>
<div class="ttc" id="class_chess_board_html_a1208d7e82f41b8e272d646bf4169c577"><div class="ttname"><a href="class_chess_board.html#a1208d7e82f41b8e272d646bf4169c577">ChessBoard::getLongCastleRights</a></div><div class="ttdeci">std::array&lt; bool, NUM_PLAYERS &gt; getLongCastleRights() const </div><div class="ttdoc">Returns long castle rights for players. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:549</div></div>
<div class="ttc" id="class_chess_board_html_a29ae57f7e0c6d57da5d8711262335be6"><div class="ttname"><a href="class_chess_board.html#a29ae57f7e0c6d57da5d8711262335be6">ChessBoard::setStalemate</a></div><div class="ttdeci">void setStalemate()</div><div class="ttdoc">Set the stalemate-Flag. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:541</div></div>
<div class="ttc" id="class_chess_board_html_a5cde9075f0b58d6ec2cff5672fea4bc8"><div class="ttname"><a href="class_chess_board.html#a5cde9075f0b58d6ec2cff5672fea4bc8">ChessBoard::getFullMoveClock</a></div><div class="ttdeci">int getFullMoveClock() const </div><div class="ttdoc">Returns full move clock. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:359</div></div>
<div class="ttc" id="struct_po_f_html"><div class="ttname"><a href="struct_po_f.html">PoF</a></div><div class="ttdef"><b>Definition:</b> ChessBoard.h:248</div></div>
<div class="ttc" id="class_chess_board_html_a109aefc39d981c2b17be3fa7e54deba1"><div class="ttname"><a href="class_chess_board.html#a109aefc39d981c2b17be3fa7e54deba1">ChessBoard::updateEnPassantSquare</a></div><div class="ttdeci">void updateEnPassantSquare(const Turn &amp;turn)</div><div class="ttdoc">Resets the enPassantSquare or sets it to the possible field. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:250</div></div>
<div class="ttc" id="class_chess_board_html_aed18d89038898d1d92f342854c295d57"><div class="ttname"><a href="class_chess_board.html#aed18d89038898d1d92f342854c295d57">ChessBoard::getLastCapturedPiece</a></div><div class="ttdeci">Piece getLastCapturedPiece() const </div><div class="ttdoc">Returns the captured piece from the last turn or Piece(NoPlayer, NoType) if no piece was captured...</div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:246</div></div>
<div class="ttc" id="class_chess_board_html_ab54fd0c9f3287221eb5d088d637fb2f3"><div class="ttname"><a href="class_chess_board.html#ab54fd0c9f3287221eb5d088d637fb2f3">ChessBoard::hasBlackPieces</a></div><div class="ttdeci">bool hasBlackPieces() const </div><div class="ttdoc">Returns true if black pieces are on the board. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:324</div></div>
<div class="ttc" id="class_chess_board_html_a1dc65ec797d17b1e66f3daa36c22791f"><div class="ttname"><a href="class_chess_board.html#a1dc65ec797d17b1e66f3daa36c22791f">ChessBoard::m_enPassantSquare</a></div><div class="ttdeci">Field m_enPassantSquare</div><div class="ttdoc">En passant square. </div><div class="ttdef"><b>Definition:</b> ChessBoard.h:229</div></div>
<div class="ttc" id="class_chess_board_html_a59082f27d8f96fc37de407cb77fd0ea5"><div class="ttname"><a href="class_chess_board.html#a59082f27d8f96fc37de407cb77fd0ea5">ChessBoard::getHalfMoveClock</a></div><div class="ttdeci">int getHalfMoveClock() const </div><div class="ttdoc">Returns half move clock. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:355</div></div>
<div class="ttc" id="class_chess_board_html_a3aace2ced12ff4a3eaac1e0e3d5432b2"><div class="ttname"><a href="class_chess_board.html#a3aace2ced12ff4a3eaac1e0e3d5432b2">ChessBoard::getShortCastleRights</a></div><div class="ttdeci">std::array&lt; bool, NUM_PLAYERS &gt; getShortCastleRights() const </div><div class="ttdoc">Returns short castle rights for players. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:545</div></div>
<div class="ttc" id="class_chess_board_html_a7075b709c7cf0062bcbd3df8fc43f98d"><div class="ttname"><a href="class_chess_board.html#a7075b709c7cf0062bcbd3df8fc43f98d">ChessBoard::isGameOver</a></div><div class="ttdeci">bool isGameOver() const </div><div class="ttdoc">Returns true if the game is over. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:553</div></div>
<div class="ttc" id="class_chess_board_html_ac968c5f1018eb92ca273ef3f2305a1c8"><div class="ttname"><a href="class_chess_board.html#ac968c5f1018eb92ca273ef3f2305a1c8">ChessBoard::applyCastleTurn</a></div><div class="ttdeci">void applyCastleTurn(const Turn &amp;turn)</div><div class="ttdoc">Performs a long/short castle turn. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:169</div></div>
<div class="ttc" id="class_turn_generator_html"><div class="ttname"><a href="class_turn_generator.html">TurnGenerator</a></div><div class="ttdoc">Turn generation (based on bitboards) and gameover detection. </div><div class="ttdef"><b>Definition:</b> TurnGenerator.h:41</div></div>
<div class="ttc" id="class_chess_board_html_a7d4081d779ec49ac4ea42bc506efe434"><div class="ttname"><a href="class_chess_board.html#a7d4081d779ec49ac4ea42bc506efe434">ChessBoard::getScore</a></div><div class="ttdeci">Score getScore(PlayerColor color, size_t depth=0) const </div><div class="ttdoc">Returns the current estimated score. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:336</div></div>
<div class="ttc" id="class_chess_board_html_a567e519cf53ae019112678af8e38b622"><div class="ttname"><a href="class_chess_board.html#a567e519cf53ae019112678af8e38b622">ChessBoard::getKingInCheck</a></div><div class="ttdeci">std::array&lt; bool, NUM_PLAYERS &gt; getKingInCheck() const </div><div class="ttdoc">Returns whether the king of the player is in check or not. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:521</div></div>
<div class="ttc" id="class_chess_board_html_ab4aa36299b386ba09c0aaf40ef08a0c1"><div class="ttname"><a href="class_chess_board.html#ab4aa36299b386ba09c0aaf40ef08a0c1">ChessBoard::applyTurn</a></div><div class="ttdeci">void applyTurn(const Turn &amp;t)</div><div class="ttdoc">Applies the given turn on current chessboard. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:106</div></div>
<div class="ttc" id="class_chess_board_html_afa2ca9d62fbf4c196ecce26d95b8b157"><div class="ttname"><a href="class_chess_board.html#afa2ca9d62fbf4c196ecce26d95b8b157">ChessBoard::addCapturedPiece</a></div><div class="ttdeci">void addCapturedPiece(const Piece capturedPiece, Field field)</div><div class="ttdoc">Takes a Piece from the board and adds it to the captured piece list. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:236</div></div>
<div class="ttc" id="class_chess_board_html_ab1d92307774eb87b65c0a731dcb191f5"><div class="ttname"><a href="class_chess_board.html#ab1d92307774eb87b65c0a731dcb191f5">ChessBoard::m_bb</a></div><div class="ttdeci">std::array&lt; std::array&lt; BitBoard, NUM_PIECETYPES+1 &gt;, NUM_PLAYERS &gt; m_bb</div><div class="ttdoc">We use bit boards for internal turn generation. </div><div class="ttdef"><b>Definition:</b> ChessBoard.h:186</div></div>
<div class="ttc" id="class_chess_board_html_a8822d129d96fd857e954ce371e72c6a3"><div class="ttname"><a href="class_chess_board.html#a8822d129d96fd857e954ce371e72c6a3">ChessBoard::applyMoveTurn</a></div><div class="ttdeci">void applyMoveTurn(const Turn &amp;turn)</div><div class="ttdoc">Applies a &quot;simple&quot; move turn. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:142</div></div>
<div class="ttc" id="class_chess_board_html_ae6739b17a2c903ce368fda6c4504fb70"><div class="ttname"><a href="class_chess_board.html#ae6739b17a2c903ce368fda6c4504fb70">ChessBoard::m_nextPlayer</a></div><div class="ttdeci">PlayerColor m_nextPlayer</div><div class="ttdoc">Player doing the next turn. </div><div class="ttdef"><b>Definition:</b> ChessBoard.h:237</div></div>
<div class="ttc" id="class_chess_board_html_adbad856fde411e1def92582c72f163a1"><div class="ttname"><a href="class_chess_board.html#adbad856fde411e1def92582c72f163a1">ChessBoard::getCheckmate</a></div><div class="ttdeci">std::array&lt; bool, NUM_PLAYERS &gt; getCheckmate() const </div><div class="ttdoc">Gameover-Flag for checkmate. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:529</div></div>
<div class="ttc" id="class_chess_board_html_a38d61076dd7630693f4284db78d16652"><div class="ttname"><a href="class_chess_board.html#a38d61076dd7630693f4284db78d16652">ChessBoard::setCheckmate</a></div><div class="ttdeci">void setCheckmate(PlayerColor player)</div><div class="ttdoc">Set the checkmate-Flag. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:525</div></div>
<div class="ttc" id="class_incremental_material_and_p_s_t_evaluator_html"><div class="ttname"><a href="class_incremental_material_and_p_s_t_evaluator.html">IncrementalMaterialAndPSTEvaluator</a></div><div class="ttdoc">Class for incrementally estimating game state using PST and Material. </div><div class="ttdef"><b>Definition:</b> IncrementalMaterialAndPSTEvaluator.h:50</div></div>
<div class="ttc" id="class_chess_board_html_abbc0a4a2932ac230a660fbe0b5ddeacc"><div class="ttname"><a href="class_chess_board.html#abbc0a4a2932ac230a660fbe0b5ddeacc">ChessBoard::m_fullMoveClock</a></div><div class="ttdeci">int m_fullMoveClock</div><div class="ttdoc">Full move clock. </div><div class="ttdef"><b>Definition:</b> ChessBoard.h:234</div></div>
<div class="ttc" id="class_turn_html"><div class="ttname"><a href="class_turn.html">Turn</a></div><div class="ttdoc">Represents a chess turn. </div><div class="ttdef"><b>Definition:</b> Turn.h:40</div></div>
<div class="ttc" id="struct_piece_html"><div class="ttname"><a href="struct_piece.html">Piece</a></div><div class="ttdef"><b>Definition:</b> ChessTypes.h:141</div></div>
<div class="ttc" id="class_chess_board_html_add1b52e7b8ee41a962d59f82792e0666"><div class="ttname"><a href="class_chess_board.html#add1b52e7b8ee41a962d59f82792e0666">ChessBoard::getBoard</a></div><div class="ttdeci">std::array&lt; Piece, 64 &gt; getBoard() const </div><div class="ttdoc">Returns the chessboard in array representation. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:300</div></div>
<div class="ttc" id="class_chess_board_html_a5bfc458b1a3fcf0b4d5bedae1d53de9a"><div class="ttname"><a href="class_chess_board.html#a5bfc458b1a3fcf0b4d5bedae1d53de9a">ChessBoard::m_stalemate</a></div><div class="ttdeci">bool m_stalemate</div><div class="ttdoc">Game is stalemate. </div><div class="ttdef"><b>Definition:</b> ChessBoard.h:222</div></div>
<div class="ttc" id="class_chess_board_html_a57cdf18ab640366eccf0c6319e0b6941"><div class="ttname"><a href="class_chess_board.html#a57cdf18ab640366eccf0c6319e0b6941">ChessBoard::m_longCastleRight</a></div><div class="ttdeci">std::array&lt; bool, NUM_PLAYERS &gt; m_longCastleRight</div><div class="ttdoc">Long castle rights for players. </div><div class="ttdef"><b>Definition:</b> ChessBoard.h:227</div></div>
<div class="ttc" id="class_chess_board_html_aa0e0a4215f74f15349b29ef7a8863845"><div class="ttname"><a href="class_chess_board.html#aa0e0a4215f74f15349b29ef7a8863845">ChessBoard::hasWhitePieces</a></div><div class="ttdeci">bool hasWhitePieces() const </div><div class="ttdoc">Returns true if white pieces are on the board. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:328</div></div>
<div class="ttc" id="class_chess_board_html_a4a45fd266f940e9db704444f20f2e670"><div class="ttname"><a href="class_chess_board.html#a4a45fd266f940e9db704444f20f2e670">ChessBoard::m_halfMoveClock</a></div><div class="ttdeci">int m_halfMoveClock</div><div class="ttdoc">Half-move clock. </div><div class="ttdef"><b>Definition:</b> ChessBoard.h:232</div></div>
<div class="ttc" id="class_chess_board_html_ad693b43b092dc20452118a3a7b4d1b5a"><div class="ttname"><a href="class_chess_board.html#ad693b43b092dc20452118a3a7b4d1b5a">ChessBoard::setKingInCheck</a></div><div class="ttdeci">void setKingInCheck(PlayerColor player, bool kingInCheck)</div><div class="ttdoc">Set or unset the kingInCheck-Flag. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:533</div></div>
<div class="ttc" id="class_chess_board_html_a3f8a1713916079f98a1a29e3ff2cdcae"><div class="ttname"><a href="class_chess_board.html#a3f8a1713916079f98a1a29e3ff2cdcae">ChessBoard::m_checkmate</a></div><div class="ttdeci">std::array&lt; bool, NUM_PLAYERS &gt; m_checkmate</div><div class="ttdoc">King of player is checkmate. </div><div class="ttdef"><b>Definition:</b> ChessBoard.h:220</div></div>
<div class="ttc" id="class_chess_board_html_a6a8bbf77568617dcc75609861733d114"><div class="ttname"><a href="class_chess_board.html#a6a8bbf77568617dcc75609861733d114">ChessBoard::getNextPlayer</a></div><div class="ttdeci">PlayerColor getNextPlayer() const </div><div class="ttdoc">Return next player to make a turn. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:332</div></div>
<div class="ttc" id="class_chess_board_html_ae335d91157ca9f927f171f2e6d6c39c5"><div class="ttname"><a href="class_chess_board.html#ae335d91157ca9f927f171f2e6d6c39c5">ChessBoard::updateBitBoards</a></div><div class="ttdeci">void updateBitBoards()</div><div class="ttdoc">Updates the helper bit boards. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:97</div></div>
<div class="ttc" id="class_incremental_zobrist_hasher_html"><div class="ttname"><a href="class_incremental_zobrist_hasher.html">IncrementalZobristHasher</a></div><div class="ttdoc">Incremental polyglot constants based Zobrist-Hash implementation. </div><div class="ttdef"><b>Definition:</b> IncrementalZobristHasher.h:44</div></div>
<div class="ttc" id="class_chess_board_html_a081989eac9f68b03db955ba68239faaf"><div class="ttname"><a href="class_chess_board.html#a081989eac9f68b03db955ba68239faaf">ChessBoard::getEnPassantSquare</a></div><div class="ttdeci">Field getEnPassantSquare() const </div><div class="ttdoc">Returns the field where en-passant rights exist. ERR if none. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:517</div></div>
<div class="ttc" id="class_chess_board_html_a4dc28ca7db68d048818d7b52bcd4e943"><div class="ttname"><a href="class_chess_board.html#a4dc28ca7db68d048818d7b52bcd4e943">ChessBoard::capturePiece</a></div><div class="ttdeci">void capturePiece(const Turn &amp;turn)</div><div class="ttdoc">Determines the type of a captured piece and takes it from the board. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:224</div></div>
<div class="ttc" id="class_chess_board_html_aa371aeae444e129c7baee9653a317fee"><div class="ttname"><a href="class_chess_board.html#aa371aeae444e129c7baee9653a317fee">ChessBoard::updateCastlingRights</a></div><div class="ttdeci">void updateCastlingRights(const Turn &amp;turn)</div><div class="ttdoc">Checks whether the given turn affects castling rights and updates them accordingly. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:274</div></div>
<div class="ttc" id="class_chess_board_html_a9b1d8836cd2962cc36a55fc69055bfa4"><div class="ttname"><a href="class_chess_board.html#a9b1d8836cd2962cc36a55fc69055bfa4">ChessBoard::m_kingInCheck</a></div><div class="ttdeci">std::array&lt; bool, NUM_PLAYERS &gt; m_kingInCheck</div><div class="ttdoc">King of player in check postion. </div><div class="ttdef"><b>Definition:</b> ChessBoard.h:218</div></div>
<div class="ttc" id="class_chess_board_html_a2d372757f127000773d3cb8696f499b7"><div class="ttname"><a href="class_chess_board.html#a2d372757f127000773d3cb8696f499b7">ChessBoard::toFEN</a></div><div class="ttdeci">std::string toFEN() const </div><div class="ttdoc">Converts the current board state into FEN notation. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:466</div></div>
<div class="ttc" id="class_chess_board_html"><div class="ttname"><a href="class_chess_board.html">ChessBoard</a></div><div class="ttdoc">Chessboard representation and logic implementation. </div><div class="ttdef"><b>Definition:</b> ChessBoard.h:97</div></div>
<div class="ttc" id="class_chess_board_html_a431307acbaaad8bf0e0f1c0afa35a08d"><div class="ttname"><a href="class_chess_board.html#a431307acbaaad8bf0e0f1c0afa35a08d">ChessBoard::fromFEN</a></div><div class="ttdeci">static ChessBoard fromFEN(const std::string &amp;fen)</div><div class="ttdoc">Create a chessboard from a Forsyth–Edwards Notation string. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:363</div></div>
<div class="ttc" id="class_chess_board_html_a1b26faed1336dee886105a1201b619f4"><div class="ttname"><a href="class_chess_board.html#a1b26faed1336dee886105a1201b619f4">ChessBoard::getHash</a></div><div class="ttdeci">Hash getHash() const </div><div class="ttdoc">Returns hash for current position. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:351</div></div>
<div class="ttc" id="class_chess_board_html_a934f63dd2e2e8ca881cd16e8a8948c70"><div class="ttname"><a href="class_chess_board.html#a934f63dd2e2e8ca881cd16e8a8948c70">ChessBoard::m_lastCapturedPiece</a></div><div class="ttdeci">Piece m_lastCapturedPiece</div><div class="ttdoc">Capured piece from last turn. </div><div class="ttdef"><b>Definition:</b> ChessBoard.h:239</div></div>
<div class="ttc" id="class_chess_board_html_a33bf2bb0050730099562e962d69f2419"><div class="ttname"><a href="class_chess_board.html#a33bf2bb0050730099562e962d69f2419">ChessBoard::isDrawDueTo50MovesRule</a></div><div class="ttdeci">bool isDrawDueTo50MovesRule() const </div><div class="ttdoc">Returns true if the game is draw due to the 50 moves rule. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:568</div></div>
<div class="ttc" id="class_chess_board_html_a4e177beabcbcdc6a2f59ec341b8ec4fc"><div class="ttname"><a href="class_chess_board.html#a4e177beabcbcdc6a2f59ec341b8ec4fc">ChessBoard::getWinner</a></div><div class="ttdeci">PlayerColor getWinner() const </div><div class="ttdoc">Returns the winner of the game. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:572</div></div>
<div class="ttc" id="class_chess_board_html_aca220e449835c01b9996c6e10207cfd4"><div class="ttname"><a href="class_chess_board.html#aca220e449835c01b9996c6e10207cfd4">ChessBoard::m_shortCastleRight</a></div><div class="ttdeci">std::array&lt; bool, NUM_PLAYERS &gt; m_shortCastleRight</div><div class="ttdoc">Short castle rights for players. </div><div class="ttdef"><b>Definition:</b> ChessBoard.h:225</div></div>
<div class="ttc" id="class_chess_board_html_aa66fd0c22576fb2fd1ba3fe5a0b5793f"><div class="ttname"><a href="class_chess_board.html#aa66fd0c22576fb2fd1ba3fe5a0b5793f">ChessBoard::initBitBoards</a></div><div class="ttdeci">void initBitBoards(std::array&lt; Piece, 64 &gt; board)</div><div class="ttdoc">Init the bit boards from the given chess board in array presentation. </div><div class="ttdef"><b>Definition:</b> ChessBoard.cpp:77</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Mar 9 2014 23:12:55 for 3dchess by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
